package com.example.actordemo2;

import akka.actor.ActorRef;
import akka.actor.ActorSelection;
import akka.actor.ActorSystem;
import com.example.actordemo2.config.SpringExtension;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class InitRun implements CommandLineRunner {
    @Autowired
    private ApplicationContext applicationContext;
    @Autowired
    ActorSystem actorSystem;
    @Autowired
    SpringExtension springExtension;
    @Override
    public void run(String... args) throws Exception {

//        ActorSelection actorSelection = actorSystem
//                .actorSelection("akka.tcp://dc_actor1@127.0.0.1:2552/user/remoteActor");
//        actorSelection.tell("1111",actorSelection.anchor());
    }
}
